/******************************************************************************

	COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2009, 2010.

	This file is part of Maxsi Engine.

	Maxsi Engine is free software: you can redistribute it and/or modify it
	under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or (at your
	option) any later version.

	Maxsi engine is distributed in the hope that it will be useful, but WITHOUT
	ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
	FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
	for more details.

	You should have received a copy of the GNU Lesser General Public License
	along with Maxsi Engine. If not, see <http://www.gnu.org/licenses/>.

	MaxsiEngine.dll
	A general purpose C++ library for the Maxsi Technology Project.

	MaxsiComplex.h
	IMAGINARY FUNCTIONS!

******************************************************************************/

#ifndef MaxsiComplex_H
#define MaxsiComplex_H

BeginMaxsiNamespace

//=============================================================================
//	ComplexDouble - A simple implementation of complex numbers using doubles.
//=============================================================================
STRUCTLINK ComplexDouble
{
	double Real;
	double Imaginary;

	ComplexDouble();
	ComplexDouble(double Reality);
	ComplexDouble(double Reality, double Imagination);

	MAXSI_FORCE_INLINE	bool				operator==	(const ComplexDouble& Oprand);
	MAXSI_FORCE_INLINE	bool				operator!=	(const ComplexDouble& Oprand);
	MAXSI_FORCE_INLINE	ComplexDouble&		operator=	(const ComplexDouble& Oprand);
	MAXSI_FORCE_INLINE	ComplexDouble&		operator-=	(const ComplexDouble& Oprand);
	MAXSI_FORCE_INLINE	ComplexDouble&		operator+=	(const ComplexDouble& Oprand);
	MAXSI_FORCE_INLINE	ComplexDouble&		operator*=	(const ComplexDouble& Oprand);
	MAXSI_FORCE_INLINE	ComplexDouble&		operator/=	(const ComplexDouble& Oprand);
	MAXSI_FORCE_INLINE	ComplexDouble&		operator+	(const ComplexDouble& Oprand);
	MAXSI_FORCE_INLINE	ComplexDouble&		operator-	(const ComplexDouble& Oprand);
	MAXSI_FORCE_INLINE	ComplexDouble&		operator*	(const ComplexDouble& Oprand);
	MAXSI_FORCE_INLINE	ComplexDouble&		operator/	(const ComplexDouble& Oprand);
};

//=============================================================================
//	ComplexDouble - A simple implementation of complex numbers using floats.
//=============================================================================
STRUCTLINK ComplexFloat
{
	float Real;
	float Imaginary;

	ComplexFloat();
	ComplexFloat(float Reality);
	ComplexFloat(float Reality, float Imagination);

	MAXSI_FORCE_INLINE	bool				operator==	(const ComplexFloat& Oprand);
	MAXSI_FORCE_INLINE	bool				operator!=	(const ComplexFloat& Oprand);
	MAXSI_FORCE_INLINE	ComplexFloat&		operator=	(const ComplexFloat& Oprand);
	MAXSI_FORCE_INLINE	ComplexFloat&		operator-=	(const ComplexFloat& Oprand);
	MAXSI_FORCE_INLINE	ComplexFloat&		operator+=	(const ComplexFloat& Oprand);
	MAXSI_FORCE_INLINE	ComplexFloat&		operator*=	(const ComplexFloat& Oprand);
	MAXSI_FORCE_INLINE	ComplexFloat&		operator/=	(const ComplexFloat& Oprand);
	MAXSI_FORCE_INLINE	ComplexFloat&		operator+	(const ComplexFloat& Oprand);
	MAXSI_FORCE_INLINE	ComplexFloat&		operator-	(const ComplexFloat& Oprand);
	MAXSI_FORCE_INLINE	ComplexFloat&		operator*	(const ComplexFloat& Oprand);
	MAXSI_FORCE_INLINE	ComplexFloat&		operator/	(const ComplexFloat& Oprand);
};

EndMaxsiNamespace

#endif
